package admin.dao.model;

import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;

public class UmsRole implements Serializable {
    private Long id;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "备注")
    private String description;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "启用状态：0->禁用；1->启用")
    private Boolean status;

    @Schema(description = "是否飞书授权码注册必要")
    private Boolean feiShuCodeRegisteNecessaryYn;

    @Schema(description = "是否超管")
    private Boolean supAdminYn;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public Boolean getFeiShuCodeRegisteNecessaryYn() {
        return feiShuCodeRegisteNecessaryYn;
    }

    public void setFeiShuCodeRegisteNecessaryYn(Boolean feiShuCodeRegisteNecessaryYn) {
        this.feiShuCodeRegisteNecessaryYn = feiShuCodeRegisteNecessaryYn;
    }

    public Boolean getSupAdminYn() {
        return supAdminYn;
    }

    public void setSupAdminYn(Boolean supAdminYn) {
        this.supAdminYn = supAdminYn;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsRole other = (UmsRole) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getFeiShuCodeRegisteNecessaryYn() == null ? other.getFeiShuCodeRegisteNecessaryYn() == null : this.getFeiShuCodeRegisteNecessaryYn().equals(other.getFeiShuCodeRegisteNecessaryYn()))
            && (this.getSupAdminYn() == null ? other.getSupAdminYn() == null : this.getSupAdminYn().equals(other.getSupAdminYn()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getFeiShuCodeRegisteNecessaryYn() == null) ? 0 : getFeiShuCodeRegisteNecessaryYn().hashCode());
        result = prime * result + ((getSupAdminYn() == null) ? 0 : getSupAdminYn().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", description=").append(description);
        sb.append(", createTime=").append(createTime);
        sb.append(", status=").append(status);
        sb.append(", feiShuCodeRegisteNecessaryYn=").append(feiShuCodeRegisteNecessaryYn);
        sb.append(", supAdminYn=").append(supAdminYn);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}